﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TinyERP.Core.Entity
{
    [NHibernate.Mapping.Attributes.Class(Table = "UINode", NameType = typeof(UINode), Lazy = false)]
    public class UINode
    {
        [NHibernate.Mapping.Attributes.Id(0, TypeType = typeof(long), Column = "UINodeID", Name = "ID")]
        [NHibernate.Mapping.Attributes.Generator(1, Class = "native")]
        public virtual long ID { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "Name")]
        public virtual string Name { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "Title")]
        public virtual string Title { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "Description")]
        public virtual string Description { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "UIClassName")]
        public virtual string UIClassName { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "IconKey")]
        public virtual string IconKey { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "ResourceKey")]
        public virtual string ResourceKey { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "Priority")]
        public virtual int Priority { get; set; }

        [NHibernate.Mapping.Attributes.Property(Column = "Visible")]
        public virtual bool Visible { get; set; }

        [NHibernate.Mapping.Attributes.ManyToOne(Column="ModuleID")]
        public virtual Module Module { get; set; }

        public virtual string FlowTo { get; set; }

        [NHibernate.Mapping.Attributes.ManyToOne(Column = "ParentNodeID")]
        public virtual UINode Parent { get; set; }
    }
}
